import request from '@/utils/request'
import type {
  ApiResponse,
  LoginRequest,
  LoginResponse,
  ArticleListRequest,
  ArticleListResponse,
  ArticleEditRequest,
  ArticleAuditRequest,
  ArticleBatchImportRequest
} from '@/types/api'

// 登录
export function login(params: any) {
  return request.post('/login', params)
}

// 文章列表
export function articleList(params: any) {
  return request.post('/article/list', params)
}

// 修改开口量
export function articleEdit(params: any) {
  return request.post('/article/editOpeningQuantity', params)
}

// 审核文章
export function articleAudit(params: any) {
  return request.post('/article/audit', params)
}

// 批量导入文章
export function articleBatchImport(params: any) {
  return request.post('/article/batchImport', params)
}

// 二次投放日期设置
export function setSecondDeployTrafficDate(params: any) {
  return request.post('/article/secondDeployTrafficDate', params)
}

// 删除文章
export function deleteArticle(params: any) {
  return request.post('/article/delete', params)
}

// 三次投放日期设置
export function setThreeDeployTrafficDate(params: any) {
  return request.post('/article/threeDeployTrafficDate', params)
}

// 改变第一次投流状态
export function editFirstDeployTraffic(params: any) {
  return request.post('/article/editFirstDeployTraffic', params)
}

// 改变第一次投流状态
export function editSecondDeployTraffic(params: any) {
  return request.post('/article/editSecondDeployTraffic', params)
}

// 改变第一次投流状态
export function editThreeDeployTraffic(params: any) {
  return request.post('/article/editThreeDeployTraffic', params)
}